Performance of database statements, such as SQL statements, is a critical component of the overall performance of a database system. Although database applications are tested and verified before delivery to customers, the performance of database statements in the database applications is difficult to predict. Every time a database statement is executed, a different execution plan may be generated by the query optimizer, e.g., based on attributes of the data being processed by the database statements. Such variations in generated execution plans can be exacerbated in environments where attributes of the data being processed fluctuate. It is possible that a new execution plan selected to implement the database statements by the query optimizer is one that has not been tested before and one whose performance has not been analyzed and verified. Should the query optimizer choose a plan that does not give the best performance, performance of the system as a whole may suffer.
It can be difficult to identify database statements for which the query optimizer is likely to change execution plans (“high-risk database statements”) prior to the database system experiencing deteriorated system performance because of sub-optimal execution plans. A database administrator may manually review database statements for a database application to identify potentially high-risk database statements. However, such a review can be costly, and generally requires expertise in query optimization, information access design, database statement design, etc.
Further, potentially high-risk database statements may be identified once a query optimizer has selected a sub-optimal execution plan to implement the database statements, which causes database system performance deterioration. However, allowing such deterioration events to occur can reduce the quality of service to customers of the database system.
Thus, there is a need for an automated process for identifying potentially high-risk database statements and taking proactive measures to minimize database system performance deterioration caused by sub-optimal execution plans.
The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.